/*     */ package com.umeng.common.util;
/*     */ 
/*     */ import java.math.BigInteger;
/*     */ 
/*     */ public class c extends d
/*     */ {
/*     */   private static final int m = 6;
/*     */   private static final int n = 3;
/*     */   private static final int o = 4;
/*  71 */   static final byte[] a = { 13, 10 };
/*     */ 
/*  80 */   private static final byte[] p = { 
/*  81 */     65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 
/*  82 */     78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 
/*  83 */     97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 
/*  84 */     110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 
/*  85 */     48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 43, 47 };
/*     */ 
/*  93 */   private static final byte[] q = { 
/*  94 */     65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 
/*  95 */     78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 
/*  96 */     97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 
/*  97 */     110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 
/*  98 */     48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 45, 95 };
/*     */ 
/* 112 */   private static final byte[] r = { 
/* 113 */     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
/* 114 */     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
/* 115 */     -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, 62, -1, 63, 52, 53, 54, 
/* 116 */     55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 
/* 117 */     5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 
/* 118 */     24, 25, -1, -1, -1, -1, 63, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 
/* 119 */     35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51 };
/*     */   private static final int s = 63;
/*     */   private final byte[] t;
/* 140 */   private final byte[] u = r;
/*     */   private final byte[] v;
/*     */   private final int w;
/*     */   private final int x;
/*     */   private int y;
/*     */ 
/*     */   public c()
/*     */   {
/* 176 */     this(0);
/*     */   }
/*     */ 
/*     */   public c(boolean paramBoolean)
/*     */   {
/* 195 */     this(76, a, paramBoolean);
/*     */   }
/*     */ 
/*     */   public c(int paramInt)
/*     */   {
/* 217 */     this(paramInt, a);
/*     */   }
/*     */ 
/*     */   public c(int paramInt, byte[] paramArrayOfByte)
/*     */   {
/* 243 */     this(paramInt, paramArrayOfByte, false);
/*     */   }
/*     */ 
/*     */   public c(int paramInt, byte[] paramArrayOfByte, boolean paramBoolean)
/*     */   {
/* 274 */     super(3, 4, 
/* 273 */       paramInt, 
/* 274 */       paramArrayOfByte == null ? 0 : paramArrayOfByte.length);
/*     */ 
/* 277 */     if (paramArrayOfByte != null) {
/* 278 */       if (n(paramArrayOfByte)) {
/* 279 */         String str = a.f(paramArrayOfByte);
/* 280 */         throw new IllegalArgumentException("lineSeparator must not contain base64 characters: [" + str + "]");
/*     */       }
/* 282 */       if (paramInt > 0) {
/* 283 */         this.x = (4 + paramArrayOfByte.length);
/* 284 */         this.v = new byte[paramArrayOfByte.length];
/* 285 */         System.arraycopy(paramArrayOfByte, 0, this.v, 0, paramArrayOfByte.length);
/*     */       } else {
/* 287 */         this.x = 4;
/* 288 */         this.v = null;
/*     */       }
/*     */     } else {
/* 291 */       this.x = 4;
/* 292 */       this.v = null;
/*     */     }
/* 294 */     this.w = (this.x - 1);
/* 295 */     this.t = (paramBoolean ? q : p);
/*     */   }
/*     */ 
/*     */   public boolean a()
/*     */   {
/* 305 */     return this.t == q;
/*     */   }
/*     */ 
/*     */   void a(byte[] paramArrayOfByte, int paramInt1, int paramInt2)
/*     */   {
/* 327 */     if (this.j)
/*     */       return;
/*     */     int i;
/* 332 */     if (paramInt2 < 0) {
/* 333 */       this.j = true;
/* 334 */       if ((this.l == 0) && (this.g == 0)) {
/* 335 */         return;
/*     */       }
/* 337 */       a(this.x);
/* 338 */       i = this.i;
/* 339 */       switch (this.l) {
/*     */       case 1:
/* 341 */         this.h[(this.i++)] = this.t[(this.y >> 2 & 0x3F)];
/* 342 */         this.h[(this.i++)] = this.t[(this.y << 4 & 0x3F)];
/*     */ 
/* 344 */         if (this.t == p) {
/* 345 */           this.h[(this.i++)] = 61;
/* 346 */           this.h[(this.i++)] = 61;
/*     */         }
/* 348 */         break;
/*     */       case 2:
/* 351 */         this.h[(this.i++)] = this.t[(this.y >> 10 & 0x3F)];
/* 352 */         this.h[(this.i++)] = this.t[(this.y >> 4 & 0x3F)];
/* 353 */         this.h[(this.i++)] = this.t[(this.y << 2 & 0x3F)];
/*     */ 
/* 355 */         if (this.t == p)
/* 356 */           this.h[(this.i++)] = 61;
/*     */         break;
/*     */       }
/* 359 */       this.k = 
/* 360 */         (this.k + (
/* 360 */         this.i - i));
/*     */ 
/* 362 */       if ((this.g > 0) && (this.k > 0)) {
/* 363 */         System.arraycopy(this.v, 0, this.h, this.i, this.v.length);
/* 364 */         this.i += this.v.length;
/*     */       }
/*     */     } else {
/* 367 */       for (i = 0; i < paramInt2; i++) {
/* 368 */         a(this.x);
/* 369 */         this.l = ((this.l + 1) % 3);
/* 370 */         int j = paramArrayOfByte[(paramInt1++)];
/* 371 */         if (j < 0) {
/* 372 */           j += 256;
/*     */         }
/* 374 */         this.y = ((this.y << 8) + j);
/* 375 */         if (this.l == 0) {
/* 376 */           this.h[(this.i++)] = this.t[(this.y >> 18 & 0x3F)];
/* 377 */           this.h[(this.i++)] = this.t[(this.y >> 12 & 0x3F)];
/* 378 */           this.h[(this.i++)] = this.t[(this.y >> 6 & 0x3F)];
/* 379 */           this.h[(this.i++)] = this.t[(this.y & 0x3F)];
/* 380 */           this.k += 4;
/* 381 */           if ((this.g > 0) && (this.g <= this.k)) {
/* 382 */             System.arraycopy(this.v, 0, this.h, this.i, this.v.length);
/* 383 */             this.i += this.v.length;
/* 384 */             this.k = 0;
/*     */           }
/*     */         }
/*     */       }
/*     */     }
/*     */   }
/*     */ 
/*     */   void b(byte[] paramArrayOfByte, int paramInt1, int paramInt2)
/*     */   {
/* 415 */     if (this.j) {
/* 416 */       return;
/*     */     }
/* 418 */     if (paramInt2 < 0) {
/* 419 */       this.j = true;
/*     */     }
/* 421 */     for (int i = 0; i < paramInt2; i++) {
/* 422 */       a(this.w);
/* 423 */       int j = paramArrayOfByte[(paramInt1++)];
/* 424 */       if (j == 61)
/*     */       {
/* 426 */         this.j = true;
/* 427 */         break;
/*     */       }
/* 429 */       if ((j >= 0) && (j < r.length)) {
/* 430 */         int k = r[j];
/* 431 */         if (k >= 0) {
/* 432 */           this.l = ((this.l + 1) % 4);
/* 433 */           this.y = ((this.y << 6) + k);
/* 434 */           if (this.l == 0) {
/* 435 */             this.h[(this.i++)] = ((byte)(this.y >> 16 & 0xFF));
/* 436 */             this.h[(this.i++)] = ((byte)(this.y >> 8 & 0xFF));
/* 437 */             this.h[(this.i++)] = ((byte)(this.y & 0xFF));
/*     */           }
/*     */ 
/*     */         }
/*     */ 
/*     */       }
/*     */ 
/*     */     }
/*     */ 
/* 447 */     if ((this.j) && (this.l != 0)) {
/* 448 */       a(this.w);
/*     */ 
/* 452 */       switch (this.l)
/*     */       {
/*     */       case 2:
/* 456 */         this.y >>= 4;
/* 457 */         this.h[(this.i++)] = ((byte)(this.y & 0xFF));
/* 458 */         break;
/*     */       case 3:
/* 460 */         this.y >>= 2;
/* 461 */         this.h[(this.i++)] = ((byte)(this.y >> 8 & 0xFF));
/* 462 */         this.h[(this.i++)] = ((byte)(this.y & 0xFF));
/*     */       }
/*     */     }
/*     */   }
/*     */ 
/*     */   public static boolean a(byte paramByte)
/*     */   {
/* 477 */     return (paramByte == 61) || ((paramByte >= 0) && (paramByte < r.length) && (r[paramByte] != -1));
/*     */   }
/*     */ 
/*     */   public static boolean a(String paramString)
/*     */   {
/* 491 */     return b(a.f(paramString));
/*     */   }
/*     */ 
/*     */   public static boolean a(byte[] paramArrayOfByte)
/*     */   {
/* 505 */     return b(paramArrayOfByte);
/*     */   }
/*     */ 
/*     */   public static boolean b(byte[] paramArrayOfByte)
/*     */   {
/* 519 */     for (int i = 0; i < paramArrayOfByte.length; i++) {
/* 520 */       if ((!a(paramArrayOfByte[i])) && (!c(paramArrayOfByte[i]))) {
/* 521 */         return false;
/*     */       }
/*     */     }
/* 524 */     return true;
/*     */   }
/*     */ 
/*     */   public static byte[] c(byte[] paramArrayOfByte)
/*     */   {
/* 535 */     return a(paramArrayOfByte, false);
/*     */   }
/*     */ 
/*     */   public static String d(byte[] paramArrayOfByte)
/*     */   {
/* 550 */     return a.f(a(paramArrayOfByte, false));
/*     */   }
/*     */ 
/*     */   public static byte[] e(byte[] paramArrayOfByte)
/*     */   {
/* 563 */     return a(paramArrayOfByte, false, true);
/*     */   }
/*     */ 
/*     */   public static String f(byte[] paramArrayOfByte)
/*     */   {
/* 576 */     return a.f(a(paramArrayOfByte, false, true));
/*     */   }
/*     */ 
/*     */   public static byte[] g(byte[] paramArrayOfByte)
/*     */   {
/* 587 */     return a(paramArrayOfByte, true);
/*     */   }
/*     */ 
/*     */   public static byte[] a(byte[] paramArrayOfByte, boolean paramBoolean)
/*     */   {
/* 602 */     return a(paramArrayOfByte, paramBoolean, false);
/*     */   }
/*     */ 
/*     */   public static byte[] a(byte[] paramArrayOfByte, boolean paramBoolean1, boolean paramBoolean2)
/*     */   {
/* 620 */     return a(paramArrayOfByte, paramBoolean1, paramBoolean2, 2147483647);
/*     */   }
/*     */ 
/*     */   public static byte[] a(byte[] paramArrayOfByte, boolean paramBoolean1, boolean paramBoolean2, int paramInt)
/*     */   {
/* 640 */     if ((paramArrayOfByte == null) || (paramArrayOfByte.length == 0)) {
/* 641 */       return paramArrayOfByte;
/*     */     }
/*     */ 
/* 646 */     c localc = paramBoolean1 ? new c(paramBoolean2) : new c(0, a, paramBoolean2);
/* 647 */     long l = localc.o(paramArrayOfByte);
/* 648 */     if (l > paramInt) {
/* 649 */       throw new IllegalArgumentException("Input array too big, the output array would be bigger (" + 
/* 650 */         l + 
/* 651 */         ") than the specified maximum size of " + 
/* 652 */         paramInt);
/*     */     }
/*     */ 
/* 655 */     return localc.l(paramArrayOfByte);
/*     */   }
/*     */ 
/*     */   public static byte[] b(String paramString)
/*     */   {
/* 667 */     return new c().c(paramString);
/*     */   }
/*     */ 
/*     */   public static byte[] h(byte[] paramArrayOfByte)
/*     */   {
/* 678 */     return new c().k(paramArrayOfByte);
/*     */   }
/*     */ 
/*     */   public static BigInteger i(byte[] paramArrayOfByte)
/*     */   {
/* 693 */     return new BigInteger(1, h(paramArrayOfByte));
/*     */   }
/*     */ 
/*     */   public static byte[] a(BigInteger paramBigInteger)
/*     */   {
/* 707 */     if (paramBigInteger == null) {
/* 708 */       throw new NullPointerException("encodeInteger called with null parameter");
/*     */     }
/* 710 */     return a(b(paramBigInteger), false);
/*     */   }
/*     */ 
/*     */   static byte[] b(BigInteger paramBigInteger)
/*     */   {
/* 721 */     int i = paramBigInteger.bitLength();
/*     */ 
/* 723 */     i = i + 7 >> 3 << 3;
/* 724 */     byte[] arrayOfByte1 = paramBigInteger.toByteArray();
/*     */ 
/* 726 */     if ((paramBigInteger.bitLength() % 8 != 0) && (paramBigInteger.bitLength() / 8 + 1 == i / 8)) {
/* 727 */       return arrayOfByte1;
/*     */     }
/*     */ 
/* 730 */     int j = 0;
/* 731 */     int k = arrayOfByte1.length;
/*     */ 
/* 734 */     if (paramBigInteger.bitLength() % 8 == 0) {
/* 735 */       j = 1;
/* 736 */       k--;
/*     */     }
/* 738 */     int i1 = i / 8 - k;
/* 739 */     byte[] arrayOfByte2 = new byte[i / 8];
/* 740 */     System.arraycopy(arrayOfByte1, j, arrayOfByte2, i1, k);
/* 741 */     return arrayOfByte2;
/*     */   }
/*     */ 
/*     */   protected boolean b(byte paramByte)
/*     */   {
/* 752 */     return (paramByte >= 0) && (paramByte < this.u.length) && (this.u[paramByte] != -1);
/*     */   }
/*     */ }

/* Location:           C:\Users\Administrator\Desktop\umeng_sdk.jar
 * Qualified Name:     com.umeng.common.util.c
 * JD-Core Version:    0.6.2
 */